package com.HZNU.Service;

import com.HZNU.Dao.DeptDao;
import com.HZNU.spring_api.POJO.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeptServiceImpl implements DeptService{

    @Autowired
    private DeptDao deptDao;

    @Override
    public int deleteByPrimaryKey(Integer deptno) {
        return deptDao.deleteByPrimaryKey(deptno);
    }

    @Override
    public int insert() {
        return deptDao.insert();
    }

    @Override
    public int insertSelective() {
        return deptDao.insertSelective();
    }

    @Override
    public boolean addDept(Dept dept) {
        deptDao.addDept(dept);
        return false;
    }

    @Override
    public Dept selectByPrimaryKey(Integer deptno) {
        return deptDao.selectByPrimaryKey(deptno);
    }

    @Override
    public int updateByPrimaryKeySelective(Dept record) {
        return deptDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Dept record) {
        return deptDao.updateByPrimaryKey(record);
    }
}
